Advertisement
Guest User

Untitled

a guest
Jan 13th, 2011
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.93 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. userresources=$HOME/.Xresources
  4. usermodmap=$HOME/.Xmodmap
  5. sysresources=/etc/X11/xinit/Xresources
  6. sysmodmap=/etc/X11/xinit/Xmodmap
  7.  
  8. # merge in defaults and keymaps
  9.  
  10. if [ -f $sysresources ]; then
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.     xrdb -merge $sysresources
  19.  
  20. fi
  21.  
  22. if [ -f $sysmodmap ]; then
  23.     xmodmap $sysmodmap
  24. fi
  25.  
  26. if [ -f "$userresources" ]; then
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.     xrdb -merge "$userresources"
  35.  
  36. fi
  37.  
  38. if [ -f "$usermodmap" ]; then
  39.     xmodmap "$usermodmap"
  40. fi
  41.  
  42. # start some nice programs
  43.  
  44.  
  45. if [ -n "`/etc/X11/chooser.sh`" ]; then
  46.     command="`/etc/X11/chooser.sh`"
  47. else
  48.     failsafe="yes"
  49. fi
  50.  
  51. if [ -d /etc/X11/xinit/xinitrc.d ] ; then
  52.     for f in /etc/X11/xinit/xinitrc.d/* ; do
  53.         [ -x "$f" ] && . "$f"
  54.     done
  55.     unset f
  56. fi
  57.  
  58. if [ -n "$failsafe" ]; then
  59.     twm &
  60.     xclock -geometry 50x50-1+1 &
  61.     xterm -geometry 80x50+494+51 &
  62.     xterm -geometry 80x20+494-0 &
  63.     exec xterm -geometry 80x66+0+0 -name login
  64. else
  65.     exec $command
  66. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement